import request from "../utils/request.js";
import axiosToken from "../utils/twoTokenRefresh.js";
export const getRouteList = async () => {
  return request.post("/user/getRouteList");
};
export const testTokenLogin = async () => {
  return axiosToken.post("/user/login");
};

export const getContent = async (data) => {
  return request.get("/system/getContent", {
    params: data,
  });
};
export const postContent = async (data) => {
  return request.post("/system/postContent", data);
};

export const getTableData = async () => {
  return {
    code: 200,
    message: "成功",
    data: [
      {
        name: "班级",
        age: 10,
      },
      {
        name: "你好",
        age: 10,
      },
    ],
  };
};
//样例

//get请求
export const getList = async (data) => {
  return request.get("", {
    params: data,
  });
};

//post请求
export const postList = async (data) => {
  return request.post("", data);
};

//下载文件  get
export const getDown = async (data) => {
  request.downFile("/getDown", {
    method: "GET",
    params: data,
  });
};

//下载文件  post
export const postDown = async (data) => {
  request.downFile("/getDown", {
    method: "POST",
    data: data,
  });
};
